{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# week01 初识Bokeh绘图库\n",
    "## 数据可视化的意义\n",
    "<font size=4>数据可视化主要旨在借助于图形化手段，清晰有效地传达与沟通信息。</font>\n",
    "## python数据可视化的工具\n",
    "1. Matplotlib  \n",
    "> - Matplotlib 是 Python 中类似 MATLAB 的绘图工具（样式没那么好看）\n",
    "2. Seaborn  \n",
    "> - Seaborn是基于matplotlib的图形可视化python包，它在matplotlib的基础上进行了更高级的API封装，提供了一种高度交互式界面，从而使得作图更加容易，便于用户能够做出各种有吸引力的统计图表。它能高度兼容numpy与pandas数据结构以及scipy与statsmodels等统计模式。\n",
    "> - Seaborn利用matplotlib的强大功能，几行代码就能创建漂亮的图表。其与matplotlib主要的区别是Seaborn的<b>默认样式以及更美观、更现代的调色板设计。</b>\n",
    "3. Bokeh  \n",
    "> - Bokeh是一个<b>专门针对Web浏览器</b>的呈现功能的交互式可视化Python库,支持现代化web浏览器展示（图表可以输出为JSON对象，HTML文档或者可交互的网络应用）,这是Bokeh与其它可视化库最核心的区别。它提供风格优雅、简洁的D3.js的图形化样式，并将此功能扩展到高性能交互的数据集，数据流上。\n",
    "> - 使用Bokeh可以快速便捷地创建交互式绘图、仪表板和数据应用程序等。\n",
    "> - Bokeh能与NumPy，Pandas，Blaze等大部分数组或表格式的数据结构完美结合。\n",
    "4. Plotly  \n",
    "> - 与Bokeh一样，Plotly的<b>强项是制作交互式图</b> ，有超过30种图表类型， 提供了一些在大多数库中没有的图表 ，如等高线图、树状图、科学图表、统计图表、3D图表、金融图表等。\n",
    "> - plotly绘制的图能直接在jupyter中查看，也能保存为离线网页，或者保存在[plot.ly](http://plot.ly)云端服务器内，以便在线查看。\n",
    "5. Pyecharts  \n",
    "> - Pyecharts是基于 *Echarts* 开发的，是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库，凭借着良好的交互性，精巧的图表设计，得到了众多开发者的认可。更重要的是，该库的文档全部由中文撰写，对英文不是很好的开发者尤其友好。而Pyecharts，实际上就是 Echarts 与 Python 的对接。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 绘图步骤\n",
    "1. 从<font color=\"red\">bokeh.plotting</font>模块导入必要的函数\n",
    "2. 定义所要用到的数据的列表  \n",
    "3. 使用<font color=\"red\">figure()</font> 创建绘图框架   \n",
    "  <font color=\"blue\">*3.1 figure()常用参数* </font>：   \n",
    "     plot_width, plot_weight 或 width, height：设置绘图区的长度和宽度  \n",
    "     tools：设置绘图区旁边所用的工具(tools)，其值可以是 “crosshair,pan,wheel_zoom,box_zoom,reset,box_select,lasso_select,save,help  \n",
    "     toolbar_location：设置工具栏显示的位置，参数值可以是： “below, above, left, right”，默认值 “right”  \n",
    "     x_minor_ticks, y_minor_ticks 默认值是 “auto”，其他值可以是大于1的整数  \n",
    "     x_range, y_range 可以是 list 或 tuple 表示范围的形式数值  \n",
    "     x_axis_label, y_axis_label：设置 x 轴 和 y 轴 的名称  \n",
    "     x_axis_location, 默认值: “below”, 可选参数有 above, below   \n",
    "     y_axis_location, 默认值: “left”, 可选参数有 left, right  \n",
    "     x_aixs_type，y_axis_type， x 和 y 轴数据的表现形式，其值可以是 “ linear, log, datetime, mercator”, 默认是 “auto”\n",
    "4. 在 figure 上绘制具体的图形，比如 circle，line，bar等\n",
    "5. 显示图片<font color=\"red\">show()</font>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 案例一"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"1101\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = true;\n",
       "\n",
       "  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  var JS_MIME_TYPE = 'application/javascript';\n",
       "  var HTML_MIME_TYPE = 'text/html';\n",
       "  var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
       "  var CLASS_NAME = 'output_bokeh rendered_html';\n",
       "\n",
       "  /**\n",
       "   * Render data to the DOM node\n",
       "   */\n",
       "  function render(props, node) {\n",
       "    var script = document.createElement(\"script\");\n",
       "    node.appendChild(script);\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when an output is cleared or removed\n",
       "   */\n",
       "  function handleClearOutput(event, handle) {\n",
       "    var cell = handle.cell;\n",
       "\n",
       "    var id = cell.output_area._bokeh_element_id;\n",
       "    var server_id = cell.output_area._bokeh_server_id;\n",
       "    // Clean up Bokeh references\n",
       "    if (id != null && id in Bokeh.index) {\n",
       "      Bokeh.index[id].model.document.clear();\n",
       "      delete Bokeh.index[id];\n",
       "    }\n",
       "\n",
       "    if (server_id !== undefined) {\n",
       "      // Clean up Bokeh references\n",
       "      var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
       "      cell.notebook.kernel.execute(cmd, {\n",
       "        iopub: {\n",
       "          output: function(msg) {\n",
       "            var id = msg.content.text.trim();\n",
       "            if (id in Bokeh.index) {\n",
       "              Bokeh.index[id].model.document.clear();\n",
       "              delete Bokeh.index[id];\n",
       "            }\n",
       "          }\n",
       "        }\n",
       "      });\n",
       "      // Destroy server and session\n",
       "      var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
       "      cell.notebook.kernel.execute(cmd);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when a new output is added\n",
       "   */\n",
       "  function handleAddOutput(event, handle) {\n",
       "    var output_area = handle.output_area;\n",
       "    var output = handle.output;\n",
       "\n",
       "    // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
       "    if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
       "      return\n",
       "    }\n",
       "\n",
       "    var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
       "\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
       "      toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
       "      // store reference to embed id on output_area\n",
       "      output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "    }\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "      var bk_div = document.createElement(\"div\");\n",
       "      bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "      var script_attrs = bk_div.children[0].attributes;\n",
       "      for (var i = 0; i < script_attrs.length; i++) {\n",
       "        toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "        toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
       "      }\n",
       "      // store reference to server id on output_area\n",
       "      output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function register_renderer(events, OutputArea) {\n",
       "\n",
       "    function append_mime(data, metadata, element) {\n",
       "      // create a DOM node to render to\n",
       "      var toinsert = this.create_output_subarea(\n",
       "        metadata,\n",
       "        CLASS_NAME,\n",
       "        EXEC_MIME_TYPE\n",
       "      );\n",
       "      this.keyboard_manager.register_events(toinsert);\n",
       "      // Render to node\n",
       "      var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "      render(props, toinsert[toinsert.length - 1]);\n",
       "      element.append(toinsert);\n",
       "      return toinsert\n",
       "    }\n",
       "\n",
       "    /* Handle when an output is cleared or removed */\n",
       "    events.on('clear_output.CodeCell', handleClearOutput);\n",
       "    events.on('delete.Cell', handleClearOutput);\n",
       "\n",
       "    /* Handle when a new output is added */\n",
       "    events.on('output_added.OutputArea', handleAddOutput);\n",
       "\n",
       "    /**\n",
       "     * Register the mime type and append_mime function with output_area\n",
       "     */\n",
       "    OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "      /* Is output safe? */\n",
       "      safe: true,\n",
       "      /* Index of renderer in `output_area.display_order` */\n",
       "      index: 0\n",
       "    });\n",
       "  }\n",
       "\n",
       "  // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
       "  if (root.Jupyter !== undefined) {\n",
       "    var events = require('base/js/events');\n",
       "    var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"1101\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) {\n",
       "        if (callback != null)\n",
       "          callback();\n",
       "      });\n",
       "    } finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.debug(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(css_urls, js_urls, callback) {\n",
       "    if (css_urls == null) css_urls = [];\n",
       "    if (js_urls == null) js_urls = [];\n",
       "\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
       "\n",
       "    function on_load() {\n",
       "      root._bokeh_is_loading--;\n",
       "      if (root._bokeh_is_loading === 0) {\n",
       "        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
       "        run_callbacks()\n",
       "      }\n",
       "    }\n",
       "\n",
       "    function on_error() {\n",
       "      console.error(\"failed to load \" + url);\n",
       "    }\n",
       "\n",
       "    for (var i = 0; i < css_urls.length; i++) {\n",
       "      var url = css_urls[i];\n",
       "      const element = document.createElement(\"link\");\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.rel = \"stylesheet\";\n",
       "      element.type = \"text/css\";\n",
       "      element.href = url;\n",
       "      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
       "      document.body.appendChild(element);\n",
       "    }\n",
       "\n",
       "    const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\": \"kLr4fYcqcSpbuI95brIH3vnnYCquzzSxHPU6XGQCIkQRGJwhg0StNbj1eegrHs12\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\": \"xIGPmVtaOm+z0BqfSOMn4lOR6ciex448GIKG4eE61LsAvmGj48XcMQZtKcE/UXZe\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\": \"Dc9u1wF/0zApGIWoBbH77iWEHtdmkuYWG839Uzmv8y8yBLXebjO9ZnERsde5Ln/P\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\": \"cT9JaBz7GiRXdENrJLZNSC6eMNF3nh3fa5fTF51Svp+ukxPdwcU5kGXGPBgDCa2j\"};\n",
       "\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      if (url in hashes) {\n",
       "        element.crossOrigin = \"anonymous\";\n",
       "        element.integrity = \"sha384-\" + hashes[url];\n",
       "      }\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  function inject_raw_css(css) {\n",
       "    const element = document.createElement(\"style\");\n",
       "    element.appendChild(document.createTextNode(css));\n",
       "    document.body.appendChild(element);\n",
       "  }\n",
       "\n",
       "  \n",
       "  var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\"];\n",
       "  var css_urls = [];\n",
       "  \n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "    \n",
       "    \n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if (root.Bokeh !== undefined || force === true) {\n",
       "      \n",
       "    for (var i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i].call(root, root.Bokeh);\n",
       "    }\n",
       "    if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"1101\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(css_urls, js_urls, function() {\n",
       "      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));"
      ],
      "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  var force = true;\n\n  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n    root._bokeh_onload_callbacks = [];\n    root._bokeh_is_loading = undefined;\n  }\n\n  \n\n  \n  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  var NB_LOAD_WARNING = {'data': {'text/html':\n     \"<div style='background-color: #fdd'>\\n\"+\n     \"<p>\\n\"+\n     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n     \"</p>\\n\"+\n     \"<ul>\\n\"+\n     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n     \"</ul>\\n\"+\n     \"<code>\\n\"+\n     \"from bokeh.resources import INLINE\\n\"+\n     \"output_notebook(resources=INLINE)\\n\"+\n     \"</code>\\n\"+\n     \"</div>\"}};\n\n  function display_loaded() {\n    var el = document.getElementById(\"1101\");\n    if (el != null) {\n      el.textContent = \"BokehJS is loading...\";\n    }\n    if (root.Bokeh !== undefined) {\n      if (el != null) {\n        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) {\n        if (callback != null)\n          callback();\n      });\n    } finally {\n      delete root._bokeh_onload_callbacks\n    }\n    console.debug(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(css_urls, js_urls, callback) {\n    if (css_urls == null) css_urls = [];\n    if (js_urls == null) js_urls = [];\n\n    root._bokeh_onload_callbacks.push(callback);\n    if (root._bokeh_is_loading > 0) {\n      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n    root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n    function on_load() {\n      root._bokeh_is_loading--;\n      if (root._bokeh_is_loading === 0) {\n        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n        run_callbacks()\n      }\n    }\n\n    function on_error() {\n      console.error(\"failed to load \" + url);\n    }\n\n    for (var i = 0; i < css_urls.length; i++) {\n      var url = css_urls[i];\n      const element = document.createElement(\"link\");\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.rel = \"stylesheet\";\n      element.type = \"text/css\";\n      element.href = url;\n      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n      document.body.appendChild(element);\n    }\n\n    const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\": \"kLr4fYcqcSpbuI95brIH3vnnYCquzzSxHPU6XGQCIkQRGJwhg0StNbj1eegrHs12\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\": \"xIGPmVtaOm+z0BqfSOMn4lOR6ciex448GIKG4eE61LsAvmGj48XcMQZtKcE/UXZe\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\": \"Dc9u1wF/0zApGIWoBbH77iWEHtdmkuYWG839Uzmv8y8yBLXebjO9ZnERsde5Ln/P\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\": \"cT9JaBz7GiRXdENrJLZNSC6eMNF3nh3fa5fTF51Svp+ukxPdwcU5kGXGPBgDCa2j\"};\n\n    for (var i = 0; i < js_urls.length; i++) {\n      var url = js_urls[i];\n      var element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.async = false;\n      element.src = url;\n      if (url in hashes) {\n        element.crossOrigin = \"anonymous\";\n        element.integrity = \"sha384-\" + hashes[url];\n      }\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n  };\n\n  function inject_raw_css(css) {\n    const element = document.createElement(\"style\");\n    element.appendChild(document.createTextNode(css));\n    document.body.appendChild(element);\n  }\n\n  \n  var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.1.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.1.1.min.js\"];\n  var css_urls = [];\n  \n\n  var inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\n    function(Bokeh) {\n    \n    \n    }\n  ];\n\n  function run_inline_js() {\n    \n    if (root.Bokeh !== undefined || force === true) {\n      \n    for (var i = 0; i < inline_js.length; i++) {\n      inline_js[i].call(root, root.Bokeh);\n    }\n    if (force === true) {\n        display_loaded();\n      }} else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    } else if (force !== true) {\n      var cell = $(document.getElementById(\"1101\")).parents('.cell').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (root._bokeh_is_loading === 0) {\n    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n    run_inline_js();\n  } else {\n    load_libs(css_urls, js_urls, function() {\n      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n      run_inline_js();\n    });\n  }\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"ce97ea3f-beee-4444-ac29-463cc6808178\" data-root-id=\"1102\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"785219ed-7605-4b36-9c0a-78ca66e47fcf\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1111\"}],\"center\":[{\"id\":\"1114\"},{\"id\":\"1118\"}],\"left\":[{\"id\":\"1115\"}],\"plot_height\":400,\"plot_width\":400,\"renderers\":[{\"id\":\"1136\"}],\"title\":{\"id\":\"1148\"},\"toolbar\":{\"id\":\"1126\"},\"x_range\":{\"id\":\"1103\"},\"x_scale\":{\"id\":\"1107\"},\"y_range\":{\"id\":\"1105\"},\"y_scale\":{\"id\":\"1109\"}},\"id\":\"1102\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1135\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1133\"}},\"id\":\"1137\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,5,9,4]},\"selected\":{\"id\":\"1155\"},\"selection_policy\":{\"id\":\"1154\"}},\"id\":\"1133\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text\":\"\"},\"id\":\"1148\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1149\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1119\"},{\"id\":\"1120\"},{\"id\":\"1121\"},{\"id\":\"1122\"},{\"id\":\"1123\"},{\"id\":\"1124\"}]},\"id\":\"1126\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1103\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"1151\"},\"ticker\":{\"id\":\"1112\"}},\"id\":\"1111\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1107\",\"type\":\"LinearScale\"},{\"attributes\":{\"data_source\":{\"id\":\"1133\"},\"glyph\":{\"id\":\"1134\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1135\"},\"selection_glyph\":null,\"view\":{\"id\":\"1137\"}},\"id\":\"1136\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1105\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1109\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1119\",\"type\":\"PanTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1134\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1112\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1111\"},\"ticker\":null},\"id\":\"1114\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"1149\"},\"ticker\":{\"id\":\"1116\"}},\"id\":\"1115\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1116\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1122\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis\":{\"id\":\"1115\"},\"dimension\":1,\"ticker\":null},\"id\":\"1118\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1123\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1120\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1124\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1154\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"overlay\":{\"id\":\"1125\"}},\"id\":\"1121\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1155\",\"type\":\"Selection\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1125\",\"type\":\"BoxAnnotation\"}],\"root_ids\":[\"1102\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"785219ed-7605-4b36-9c0a-78ca66e47fcf\",\"root_ids\":[\"1102\"],\"roots\":{\"1102\":\"ce97ea3f-beee-4444-ac29-463cc6808178\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "1102"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#导入库\n",
    "from bokeh.plotting import figure,output_notebook,show\n",
    "output_notebook()\n",
    "\n",
    "#数据\n",
    "x = [1,2,3,4,5]\n",
    "y = [6,7,5,9,4]\n",
    "\n",
    "#画布：尺寸\n",
    "p = figure(plot_width=400,plot_height = 400)\n",
    "p.circle(x,y,size=20,color=\"navy\",alpha=0.5)\n",
    "\n",
    "#显示\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 案例二：建立画布列表，统一设置图表样式，同时显示表格  \n",
    "```\n",
    "# 创建画布列表\n",
    "figures = []\n",
    "# 向列表添加元素\n",
    "figures.append(p)\n",
    "```\n",
    "<font size=4>环装楔形图 常用参数说明：[参考资料](https://vimsky.com/examples/usage/bokeh-plotting-figure-annular_wedge-function-in-python.html) </font>     \n",
    "```\n",
    "annular_wedge(x, y, inner_radius, outer_radius, start_angle, end_angle, direction=’anticlock’, *, end_angle_units=’rad’, fill_alpha=1.0, fill_color=’gray’, inner_radius_units=’data’, line_alpha=1.0, line_cap=’butt’, line_color=’black’, line_dash=[], line_dash_offset=0, line_join=’bevel’, line_width=1, name=None, outer_radius_units=’data’, start_angle_units=’rad’, tags=[], **kwargs)\n",
    "```  \n",
    "    x:该参数是环形楔形件中心的x-coordinates。  \n",
    "    y:该参数是环形楔形件中心的y-coordinates。  \n",
    "    inner_radius:此参数是环形楔的内半径。  \n",
    "    outer_radius:此参数是环形楔的外半径。  \n",
    "    start_angle:该参数是启动环形楔块的角度。  \n",
    "    end_angle:此参数是结束环形楔的角度。  \n",
    "    direction:此参数是在起始角度和终止角度之间的行程方向。  \n",
    "    fill_alpha:此参数是环形楔的填充Alpha值。  \n",
    "    fill_color:此参数是环形楔形的填充颜色值。  \n",
    "    line_alpha:此参数是默认值1.0的环形楔的线alpha值。  \n",
    "    line_cap:此参数是具有默认对接值的环形楔的线帽值。  \n",
    "    line_color:此参数是默认值为黑色的环形楔形的线条颜色值。  \n",
    "    line_dash:此参数是默认值为[]的环形楔的线破折号。  \n",
    "    line_dash_offset:此参数是默认值为0的环形楔的虚线虚线偏移值。  \n",
    "    line_join:此参数是具有默认斜角的环形楔的线连接值。  \n",
    "    line_width:此参数是默认值1的环形楔的线宽值。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"e5e75cc7-b301-4e85-b5ac-ebba1908b987\" data-root-id=\"1528\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"3bf5c486-f773-48a0-b2a3-e784be29bec9\":{\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1527\"},{\"id\":\"1525\"}]},\"id\":\"1528\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1491\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"#7FC97F\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_color\":{\"value\":\"#7FC97F\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1503\",\"type\":\"Annulus\"},{\"attributes\":{\"toolbars\":[{\"id\":\"1457\"},{\"id\":\"1495\"}],\"tools\":[{\"id\":\"1450\"},{\"id\":\"1451\"},{\"id\":\"1452\"},{\"id\":\"1453\"},{\"id\":\"1454\"},{\"id\":\"1455\"},{\"id\":\"1488\"},{\"id\":\"1489\"},{\"id\":\"1490\"},{\"id\":\"1491\"},{\"id\":\"1492\"},{\"id\":\"1493\"}]},\"id\":\"1526\",\"type\":\"ProxyToolbar\"},{\"attributes\":{\"children\":[[{\"id\":\"1431\"},0,0],[{\"id\":\"1469\"},0,1]]},\"id\":\"1525\",\"type\":\"GridBox\"},{\"attributes\":{},\"id\":\"1478\",\"type\":\"LinearScale\"},{\"attributes\":{\"data_source\":{\"id\":\"1464\"},\"glyph\":{\"id\":\"1465\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1466\"},\"selection_glyph\":null,\"view\":{\"id\":\"1468\"}},\"id\":\"1467\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1464\"}},\"id\":\"1468\",\"type\":\"CDSView\"},{\"attributes\":{\"formatter\":{\"id\":\"1519\"},\"ticker\":{\"id\":\"1481\"}},\"id\":\"1480\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1451\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1454\",\"type\":\"ResetTool\"},{\"attributes\":{\"toolbar\":{\"id\":\"1526\"},\"toolbar_location\":\"above\"},\"id\":\"1527\",\"type\":\"ToolbarBox\"},{\"attributes\":{},\"id\":\"1436\",\"type\":\"DataRange1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1456\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1450\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"1480\"},\"ticker\":null},\"id\":\"1483\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1514\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"1442\"}],\"center\":[{\"id\":\"1445\"},{\"id\":\"1449\"}],\"left\":[{\"id\":\"1446\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1467\"}],\"title\":{\"id\":\"1432\"},\"toolbar\":{\"id\":\"1457\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1434\"},\"x_scale\":{\"id\":\"1438\"},\"y_range\":{\"id\":\"1436\"},\"y_scale\":{\"id\":\"1440\"}},\"id\":\"1431\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data_source\":{\"id\":\"1502\"},\"glyph\":{\"id\":\"1503\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1504\"},\"selection_glyph\":null,\"view\":{\"id\":\"1506\"}},\"id\":\"1505\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1450\"},{\"id\":\"1451\"},{\"id\":\"1452\"},{\"id\":\"1453\"},{\"id\":\"1454\"},{\"id\":\"1455\"}]},\"id\":\"1457\",\"type\":\"Toolbar\"},{\"attributes\":{\"formatter\":{\"id\":\"1508\"},\"ticker\":{\"id\":\"1447\"}},\"id\":\"1446\",\"type\":\"LinearAxis\"},{\"attributes\":{\"formatter\":{\"id\":\"1510\"},\"ticker\":{\"id\":\"1443\"}},\"id\":\"1442\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1440\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1492\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1453\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1476\",\"type\":\"LinearScale\"},{\"attributes\":{\"end_angle\":{\"units\":\"rad\",\"value\":4.1},\"fill_color\":{\"value\":\"#8888ee\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_color\":{\"value\":\"#8888ee\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"start_angle\":{\"units\":\"rad\",\"value\":0.6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1465\",\"type\":\"AnnularWedge\"},{\"attributes\":{},\"id\":\"1485\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1513\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1480\"}],\"center\":[{\"id\":\"1483\"},{\"id\":\"1487\"}],\"left\":[{\"id\":\"1484\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1505\"}],\"title\":{\"id\":\"1470\"},\"toolbar\":{\"id\":\"1495\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1472\"},\"x_scale\":{\"id\":\"1476\"},\"y_range\":{\"id\":\"1474\"},\"y_scale\":{\"id\":\"1478\"}},\"id\":\"1469\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1455\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1443\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text\":\"annulus\"},\"id\":\"1470\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1510\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1446\"},\"dimension\":1,\"ticker\":null},\"id\":\"1449\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#7FC97F\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#7FC97F\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1504\",\"type\":\"Annulus\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1494\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"1523\"},\"selection_policy\":{\"id\":\"1522\"}},\"id\":\"1502\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1488\"},{\"id\":\"1489\"},{\"id\":\"1490\"},{\"id\":\"1491\"},{\"id\":\"1492\"},{\"id\":\"1493\"}]},\"id\":\"1495\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1434\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1522\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1447\",\"type\":\"BasicTicker\"},{\"attributes\":{\"end_angle\":{\"units\":\"rad\",\"value\":4.1},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#8888ee\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#8888ee\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"start_angle\":{\"units\":\"rad\",\"value\":0.6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1466\",\"type\":\"AnnularWedge\"},{\"attributes\":{\"axis\":{\"id\":\"1484\"},\"dimension\":1,\"ticker\":null},\"id\":\"1487\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1502\"}},\"id\":\"1506\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1508\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1517\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text\":\"annular_wedge\"},\"id\":\"1432\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1523\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1489\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1493\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1438\",\"type\":\"LinearScale\"},{\"attributes\":{\"overlay\":{\"id\":\"1494\"}},\"id\":\"1490\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1519\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1481\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1472\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1474\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1442\"},\"ticker\":null},\"id\":\"1445\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1456\"}},\"id\":\"1452\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"formatter\":{\"id\":\"1517\"},\"ticker\":{\"id\":\"1485\"}},\"id\":\"1484\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"1514\"},\"selection_policy\":{\"id\":\"1513\"}},\"id\":\"1464\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1488\",\"type\":\"PanTool\"}],\"root_ids\":[\"1528\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"3bf5c486-f773-48a0-b2a3-e784be29bec9\",\"root_ids\":[\"1528\"],\"roots\":{\"1528\":\"e5e75cc7-b301-4e85-b5ac-ebba1908b987\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "1528"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 基本图元绘制\n",
    "import numpy as np # 矩阵模块\n",
    "from bokeh.layouts import gridplot\n",
    "\n",
    "N = 9\n",
    "x = np.linspace(-2,2,N)\n",
    "y = x**2\n",
    "size = np.linspace(10,20,N)\n",
    "xpts = np.array([-.09,-.12,.0,.12,.09])\n",
    "ypts = np.array([-.1,-.02,.1,.02,-.1])\n",
    "\n",
    "# 画布列表\n",
    "figures = []\n",
    "# 1. 环状楔\n",
    "p = figure(title=\"annular_wedge\",plot_width=400,plot_height=400)\n",
    "p.annular_wedge(x, y, 10, 20, 0.6, 4.1, color=\"#8888ee\",inner_radius_units=\"screen\", outer_radius_units=\"screen\")\n",
    "\n",
    "figures.append(p)\n",
    "# 显示图形\n",
    "# show(p)\n",
    "\n",
    "# 2.环状图\n",
    "p =figure(title=\"annulus\")\n",
    "p.annulus(x,y,10,20,color=\"#7FC97F\",\n",
    "         inner_radius_units=\"screen\",\n",
    "          outer_radius_units=\"screen\")\n",
    "figures.append(p)\n",
    "# 显示一组图形，统一设置绘图大小\n",
    "show(gridplot(figures,ncols=4,plot_width=200,plot_height=200))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"de90bc32-8e58-4561-a437-cafc8229513e\" data-root-id=\"2093\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"1fa5bad2-0260-4353-8034-7bcc6ea4539f\":{\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"2092\"},{\"id\":\"2090\"}]},\"id\":\"2093\",\"type\":\"Column\"},{\"attributes\":{\"below\":[{\"id\":\"1944\"}],\"center\":[{\"id\":\"1947\"},{\"id\":\"1951\"}],\"left\":[{\"id\":\"1948\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1969\"}],\"title\":{\"id\":\"1934\"},\"toolbar\":{\"id\":\"1959\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1936\"},\"x_scale\":{\"id\":\"1940\"},\"y_range\":{\"id\":\"1938\"},\"y_scale\":{\"id\":\"1942\"}},\"id\":\"1933\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"cx0\":{\"field\":\"cx0\"},\"cx1\":{\"field\":\"cx1\"},\"cy0\":{\"field\":\"cy0\"},\"cy1\":{\"field\":\"cy1\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#8073AC\"},\"line_width\":{\"value\":2},\"x0\":{\"field\":\"x0\"},\"x1\":{\"field\":\"x1\"},\"y0\":{\"field\":\"y0\"},\"y1\":{\"field\":\"y1\"}},\"id\":\"1816\",\"type\":\"Bezier\"},{\"attributes\":{},\"id\":\"2073\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"1844\"}},\"id\":\"1840\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1978\",\"type\":\"LinearScale\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1844\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1980\",\"type\":\"LinearScale\"},{\"attributes\":{\"end_angle\":{\"units\":\"rad\",\"value\":4.1},\"line_color\":{\"value\":\"#BEAED4\"},\"line_width\":{\"value\":3},\"radius\":{\"units\":\"screen\",\"value\":20},\"start_angle\":{\"units\":\"rad\",\"value\":0.6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1777\",\"type\":\"Arc\"},{\"attributes\":{},\"id\":\"2075\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1727\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2021\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1755\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data_source\":{\"id\":\"1738\"},\"glyph\":{\"id\":\"1739\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1740\"},\"selection_glyph\":null,\"view\":{\"id\":\"1742\"}},\"id\":\"1741\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1824\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2088\"},\"selection_policy\":{\"id\":\"2087\"}},\"id\":\"2004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1990\"},{\"id\":\"1991\"},{\"id\":\"1992\"},{\"id\":\"1993\"},{\"id\":\"1994\"},{\"id\":\"1995\"}]},\"id\":\"1997\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1803\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1721\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1983\",\"type\":\"BasicTicker\"},{\"attributes\":{\"formatter\":{\"id\":\"2084\"},\"ticker\":{\"id\":\"1983\"}},\"id\":\"1982\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"1852\"},\"glyph\":{\"id\":\"1853\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1854\"},\"selection_glyph\":null,\"view\":{\"id\":\"1856\"}},\"id\":\"1855\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1982\"},\"ticker\":null},\"id\":\"1985\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1804\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1710\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1986\"},\"dimension\":1,\"ticker\":null},\"id\":\"1989\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1839\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2030\"},\"ticker\":{\"id\":\"1755\"}},\"id\":\"1754\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1738\"}},\"id\":\"1742\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2064\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1928\"}},\"id\":\"1932\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1786\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"1996\"}},\"id\":\"1992\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2048\"},\"ticker\":{\"id\":\"1831\"}},\"id\":\"1830\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1822\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1835\",\"type\":\"BasicTicker\"},{\"attributes\":{\"toolbars\":[{\"id\":\"1693\"},{\"id\":\"1731\"},{\"id\":\"1769\"},{\"id\":\"1807\"},{\"id\":\"1845\"},{\"id\":\"1883\"},{\"id\":\"1921\"},{\"id\":\"1959\"},{\"id\":\"1997\"}],\"tools\":[{\"id\":\"1686\"},{\"id\":\"1687\"},{\"id\":\"1688\"},{\"id\":\"1689\"},{\"id\":\"1690\"},{\"id\":\"1691\"},{\"id\":\"1724\"},{\"id\":\"1725\"},{\"id\":\"1726\"},{\"id\":\"1727\"},{\"id\":\"1728\"},{\"id\":\"1729\"},{\"id\":\"1762\"},{\"id\":\"1763\"},{\"id\":\"1764\"},{\"id\":\"1765\"},{\"id\":\"1766\"},{\"id\":\"1767\"},{\"id\":\"1800\"},{\"id\":\"1801\"},{\"id\":\"1802\"},{\"id\":\"1803\"},{\"id\":\"1804\"},{\"id\":\"1805\"},{\"id\":\"1838\"},{\"id\":\"1839\"},{\"id\":\"1840\"},{\"id\":\"1841\"},{\"id\":\"1842\"},{\"id\":\"1843\"},{\"id\":\"1876\"},{\"id\":\"1877\"},{\"id\":\"1878\"},{\"id\":\"1879\"},{\"id\":\"1880\"},{\"id\":\"1881\"},{\"id\":\"1914\"},{\"id\":\"1915\"},{\"id\":\"1916\"},{\"id\":\"1917\"},{\"id\":\"1918\"},{\"id\":\"1919\"},{\"id\":\"1952\"},{\"id\":\"1953\"},{\"id\":\"1954\"},{\"id\":\"1955\"},{\"id\":\"1956\"},{\"id\":\"1957\"},{\"id\":\"1990\"},{\"id\":\"1991\"},{\"id\":\"1992\"},{\"id\":\"1993\"},{\"id\":\"1994\"},{\"id\":\"1995\"}]},\"id\":\"2091\",\"type\":\"ProxyToolbar\"},{\"attributes\":{},\"id\":\"1974\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2066\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"formatter\":{\"id\":\"2037\"},\"ticker\":{\"id\":\"1797\"}},\"id\":\"1796\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1830\"},\"ticker\":null},\"id\":\"1833\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2024\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1800\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1990\",\"type\":\"PanTool\"},{\"attributes\":{\"source\":{\"id\":\"1700\"}},\"id\":\"1704\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2010\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2019\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1797\",\"type\":\"BasicTicker\"},{\"attributes\":{\"toolbar\":{\"id\":\"2091\"},\"toolbar_location\":\"above\"},\"id\":\"2092\",\"type\":\"ToolbarBox\"},{\"attributes\":{\"below\":[{\"id\":\"1906\"}],\"center\":[{\"id\":\"1909\"},{\"id\":\"1913\"}],\"left\":[{\"id\":\"1910\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1931\"}],\"title\":{\"id\":\"1896\"},\"toolbar\":{\"id\":\"1921\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1898\"},\"x_scale\":{\"id\":\"1902\"},\"y_range\":{\"id\":\"1900\"},\"y_scale\":{\"id\":\"1904\"}},\"id\":\"1895\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1991\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1788\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"#F46D43\",\"line_alpha\":0.1,\"line_color\":\"#F46D43\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2006\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"2004\"}},\"id\":\"2008\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1728\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1976\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data_source\":{\"id\":\"2004\"},\"glyph\":{\"id\":\"2005\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"2006\"},\"selection_glyph\":null,\"view\":{\"id\":\"2008\"}},\"id\":\"2007\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"children\":[[{\"id\":\"1667\"},0,0],[{\"id\":\"1705\"},0,1],[{\"id\":\"1743\"},0,2],[{\"id\":\"1781\"},0,3],[{\"id\":\"1819\"},1,0],[{\"id\":\"1857\"},1,1],[{\"id\":\"1895\"},1,2],[{\"id\":\"1933\"},1,3],[{\"id\":\"1971\"},2,0]]},\"id\":\"2090\",\"type\":\"GridBox\"},{\"attributes\":{},\"id\":\"1826\",\"type\":\"LinearScale\"},{\"attributes\":{\"formatter\":{\"id\":\"2082\"},\"ticker\":{\"id\":\"1987\"}},\"id\":\"1986\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1720\"},\"dimension\":1,\"ticker\":null},\"id\":\"1723\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"1966\"},\"glyph\":{\"id\":\"1967\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1968\"},\"selection_glyph\":null,\"view\":{\"id\":\"1970\"}},\"id\":\"1969\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1746\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1801\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1752\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1966\"}},\"id\":\"1970\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1805\",\"type\":\"HelpTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1806\"}},\"id\":\"1802\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1987\",\"type\":\"BasicTicker\"},{\"attributes\":{\"below\":[{\"id\":\"1982\"}],\"center\":[{\"id\":\"1985\"},{\"id\":\"1989\"}],\"left\":[{\"id\":\"1986\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"2007\"}],\"title\":{\"id\":\"1972\"},\"toolbar\":{\"id\":\"1997\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1974\"},\"x_scale\":{\"id\":\"1978\"},\"y_range\":{\"id\":\"1976\"},\"y_scale\":{\"id\":\"1980\"}},\"id\":\"1971\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1841\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1763\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"cx0\":{\"field\":\"cx0\"},\"cx1\":{\"field\":\"cx1\"},\"cy0\":{\"field\":\"cy0\"},\"cy1\":{\"field\":\"cy1\"},\"line_color\":{\"value\":\"#8073AC\"},\"line_width\":{\"value\":2},\"x0\":{\"field\":\"x0\"},\"x1\":{\"field\":\"x1\"},\"y0\":{\"field\":\"y0\"},\"y1\":{\"field\":\"y1\"}},\"id\":\"1815\",\"type\":\"Bezier\"},{\"attributes\":{\"below\":[{\"id\":\"1868\"}],\"center\":[{\"id\":\"1871\"},{\"id\":\"1875\"}],\"left\":[{\"id\":\"1872\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1893\"}],\"title\":{\"id\":\"1858\"},\"toolbar\":{\"id\":\"1883\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1860\"},\"x_scale\":{\"id\":\"1864\"},\"y_range\":{\"id\":\"1862\"},\"y_scale\":{\"id\":\"1866\"}},\"id\":\"1857\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"formatter\":{\"id\":\"2028\"},\"ticker\":{\"id\":\"1759\"}},\"id\":\"1758\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#7FC97F\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#7FC97F\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1740\",\"type\":\"Annulus\"},{\"attributes\":{\"source\":{\"id\":\"1776\"}},\"id\":\"1780\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2043\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1993\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis\":{\"id\":\"1758\"},\"dimension\":1,\"ticker\":null},\"id\":\"1761\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#3288BD\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#3288BD\"},\"radius\":{\"units\":\"data\",\"value\":0.1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1854\",\"type\":\"Circle\"},{\"attributes\":{\"formatter\":{\"id\":\"2019\"},\"ticker\":{\"id\":\"1721\"}},\"id\":\"1720\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"1776\"},\"glyph\":{\"id\":\"1777\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1778\"},\"selection_glyph\":null,\"view\":{\"id\":\"1780\"}},\"id\":\"1779\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2061\",\"type\":\"Selection\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1724\"},{\"id\":\"1725\"},{\"id\":\"1726\"},{\"id\":\"1727\"},{\"id\":\"1728\"},{\"id\":\"1729\"}]},\"id\":\"1731\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2060\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1958\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1725\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2042\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data_source\":{\"id\":\"1700\"},\"glyph\":{\"id\":\"1701\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1702\"},\"selection_glyph\":null,\"view\":{\"id\":\"1704\"}},\"id\":\"1703\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"below\":[{\"id\":\"1792\"}],\"center\":[{\"id\":\"1795\"},{\"id\":\"1799\"}],\"left\":[{\"id\":\"1796\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1817\"}],\"title\":{\"id\":\"1782\"},\"toolbar\":{\"id\":\"1807\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1784\"},\"x_scale\":{\"id\":\"1788\"},\"y_range\":{\"id\":\"1786\"},\"y_scale\":{\"id\":\"1790\"}},\"id\":\"1781\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2052\"},\"selection_policy\":{\"id\":\"2051\"}},\"id\":\"1852\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2079\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1729\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2078\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"1716\"},\"ticker\":null},\"id\":\"1719\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1828\",\"type\":\"LinearScale\"},{\"attributes\":{\"text\":\"bezier\"},\"id\":\"1782\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2070\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1762\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1750\",\"type\":\"LinearScale\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1806\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1759\",\"type\":\"BasicTicker\"},{\"attributes\":{\"formatter\":{\"id\":\"2046\"},\"ticker\":{\"id\":\"1835\"}},\"id\":\"1834\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1793\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1708\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1790\",\"type\":\"LinearScale\"},{\"attributes\":{\"text\":\"patch\"},\"id\":\"1972\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1754\"},\"ticker\":null},\"id\":\"1757\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1834\"},\"dimension\":1,\"ticker\":null},\"id\":\"1837\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1784\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1838\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1831\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2025\",\"type\":\"Selection\"},{\"attributes\":{\"text\":\"annulus\"},\"id\":\"1706\",\"type\":\"Title\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1996\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1842\",\"type\":\"ResetTool\"},{\"attributes\":{\"angle\":{\"units\":\"rad\",\"value\":-0.7},\"fill_color\":{\"value\":\"#1D91C0\"},\"height\":{\"units\":\"screen\",\"value\":25},\"line_color\":{\"value\":\"#1D91C0\"},\"width\":{\"units\":\"screen\",\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1967\",\"type\":\"Oval\"},{\"attributes\":{},\"id\":\"2052\",\"type\":\"Selection\"},{\"attributes\":{\"overlay\":{\"id\":\"1730\"}},\"id\":\"1726\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1796\"},\"dimension\":1,\"ticker\":null},\"id\":\"1799\",\"type\":\"Grid\"},{\"attributes\":{\"below\":[{\"id\":\"1716\"}],\"center\":[{\"id\":\"1719\"},{\"id\":\"1723\"}],\"left\":[{\"id\":\"1720\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1741\"}],\"title\":{\"id\":\"1706\"},\"toolbar\":{\"id\":\"1731\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1708\"},\"x_scale\":{\"id\":\"1712\"},\"y_range\":{\"id\":\"1710\"},\"y_scale\":{\"id\":\"1714\"}},\"id\":\"1705\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2012\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_color\":{\"value\":\"#3288BD\"},\"line_color\":{\"value\":\"#3288BD\"},\"radius\":{\"units\":\"data\",\"value\":0.1},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1853\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1724\",\"type\":\"PanTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2039\"},\"ticker\":{\"id\":\"1793\"}},\"id\":\"1792\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1712\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1830\"}],\"center\":[{\"id\":\"1833\"},{\"id\":\"1837\"}],\"left\":[{\"id\":\"1834\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1855\"}],\"title\":{\"id\":\"1820\"},\"toolbar\":{\"id\":\"1845\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1822\"},\"x_scale\":{\"id\":\"1826\"},\"y_range\":{\"id\":\"1824\"},\"y_scale\":{\"id\":\"1828\"}},\"id\":\"1819\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2069\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text\":\"circle\"},\"id\":\"1820\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1995\",\"type\":\"HelpTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2021\"},\"ticker\":{\"id\":\"1717\"}},\"id\":\"1716\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2034\"},\"selection_policy\":{\"id\":\"2033\"}},\"id\":\"1776\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"1814\"},\"glyph\":{\"id\":\"1815\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1816\"},\"selection_glyph\":null,\"view\":{\"id\":\"1818\"}},\"id\":\"1817\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"cx0\":{\"__ndarray__\":\"ZmZmZmZm/r9mZmZmZmb2v83MzMzMzOy/mpmZmZmZ2b+amZmZmZm5PzMzMzMzM+M/mpmZmZmZ8T+amZmZmZn5P83MzMzMzABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"cx1\":{\"__ndarray__\":\"zczMzMzMAMCamZmZmZn5v5qZmZmZmfG/MzMzMzMz47+amZmZmZm5v5qZmZmZmdk/zczMzMzM7D9mZmZmZmb2P2ZmZmZmZv4/\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"cy0\":{\"__ndarray__\":\"ZmZmZmZmEEDNzMzMzMwCQJqZmZmZmfE/ZmZmZmZm1j+amZmZmZm5P2ZmZmZmZtY/mpmZmZmZ8T/NzMzMzMwCQGZmZmZmZhBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"cy1\":{\"__ndarray__\":\"MzMzMzMzD0AzMzMzMzMBQM3MzMzMzOw/MzMzMzMzwz+amZmZmZm5vzMzMzMzM8M/zczMzMzM7D8zMzMzMzMBQDMzMzMzMw9A\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"x0\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"x1\":{\"__ndarray__\":\"zczMzMzM/L/NzMzMzMz0v5qZmZmZmem/MzMzMzMz07+amZmZmZnJP2ZmZmZmZuY/MzMzMzMz8z8zMzMzMzP7P5qZmZmZmQFA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y0\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y1\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2043\"},\"selection_policy\":{\"id\":\"2042\"}},\"id\":\"1814\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1994\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1814\"}},\"id\":\"1818\",\"type\":\"CDSView\"},{\"attributes\":{\"text\":\"arc\"},\"id\":\"1744\",\"type\":\"Title\"},{\"attributes\":{\"data_source\":{\"id\":\"1890\"},\"glyph\":{\"id\":\"1891\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1892\"},\"selection_glyph\":null,\"view\":{\"id\":\"1894\"}},\"id\":\"1893\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2082\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1843\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1714\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1852\"}},\"id\":\"1856\",\"type\":\"CDSView\"},{\"attributes\":{\"below\":[{\"id\":\"1754\"}],\"center\":[{\"id\":\"1757\"},{\"id\":\"1761\"}],\"left\":[{\"id\":\"1758\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1779\"}],\"title\":{\"id\":\"1744\"},\"toolbar\":{\"id\":\"1769\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1746\"},\"x_scale\":{\"id\":\"1750\"},\"y_range\":{\"id\":\"1748\"},\"y_scale\":{\"id\":\"1752\"}},\"id\":\"1743\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"1792\"},\"ticker\":null},\"id\":\"1795\",\"type\":\"Grid\"},{\"attributes\":{\"end_angle\":{\"units\":\"rad\",\"value\":4.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#BEAED4\"},\"line_width\":{\"value\":3},\"radius\":{\"units\":\"screen\",\"value\":20},\"start_angle\":{\"units\":\"rad\",\"value\":0.6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1778\",\"type\":\"Arc\"},{\"attributes\":{},\"id\":\"1717\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2084\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2051\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1690\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1880\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1879\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1949\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1689\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1672\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"2073\"},\"ticker\":{\"id\":\"1949\"}},\"id\":\"1948\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1920\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"formatter\":{\"id\":\"2012\"},\"ticker\":{\"id\":\"1679\"}},\"id\":\"1678\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_color\":\"#F46D43\",\"line_color\":\"#F46D43\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2005\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1940\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1953\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1882\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1686\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2039\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2034\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1674\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2046\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_color\":{\"value\":\"#8073AC\"},\"line_width\":{\"value\":2},\"xs\":{\"field\":\"xs\"},\"ys\":{\"field\":\"ys\"}},\"id\":\"1929\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1687\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2087\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2079\"},\"selection_policy\":{\"id\":\"2078\"}},\"id\":\"1966\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2088\",\"type\":\"Selection\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1914\"},{\"id\":\"1915\"},{\"id\":\"1916\"},{\"id\":\"1917\"},{\"id\":\"1918\"},{\"id\":\"1919\"}]},\"id\":\"1921\",\"type\":\"Toolbar\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1838\"},{\"id\":\"1839\"},{\"id\":\"1840\"},{\"id\":\"1841\"},{\"id\":\"1842\"},{\"id\":\"1843\"}]},\"id\":\"1845\",\"type\":\"Toolbar\"},{\"attributes\":{\"formatter\":{\"id\":\"2075\"},\"ticker\":{\"id\":\"1945\"}},\"id\":\"1944\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"1928\"},\"glyph\":{\"id\":\"1929\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1930\"},\"selection_glyph\":null,\"view\":{\"id\":\"1932\"}},\"id\":\"1931\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1944\"},\"ticker\":null},\"id\":\"1947\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1898\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1683\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text\":\"oval\"},\"id\":\"1934\",\"type\":\"Title\"},{\"attributes\":{\"source\":{\"id\":\"1890\"}},\"id\":\"1894\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2048\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1765\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1902\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1868\"},\"ticker\":null},\"id\":\"1871\",\"type\":\"Grid\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1800\"},{\"id\":\"1801\"},{\"id\":\"1802\"},{\"id\":\"1803\"},{\"id\":\"1804\"},{\"id\":\"1805\"}]},\"id\":\"1807\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis\":{\"id\":\"1910\"},\"dimension\":1,\"ticker\":null},\"id\":\"1913\",\"type\":\"Grid\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1692\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2015\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"overlay\":{\"id\":\"1692\"}},\"id\":\"1688\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1748\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1872\"},\"dimension\":1,\"ticker\":null},\"id\":\"1875\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1682\"},\"dimension\":1,\"ticker\":null},\"id\":\"1685\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1864\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1938\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1873\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1952\",\"type\":\"PanTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2055\"},\"ticker\":{\"id\":\"1873\"}},\"id\":\"1872\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1679\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1676\",\"type\":\"LinearScale\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1768\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1686\"},{\"id\":\"1687\"},{\"id\":\"1688\"},{\"id\":\"1689\"},{\"id\":\"1690\"},{\"id\":\"1691\"}]},\"id\":\"1693\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis\":{\"id\":\"1948\"},\"dimension\":1,\"ticker\":null},\"id\":\"1951\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1906\"},\"ticker\":null},\"id\":\"1909\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#8073AC\"},\"line_width\":{\"value\":2},\"xs\":{\"field\":\"xs\"},\"ys\":{\"field\":\"ys\"}},\"id\":\"1930\",\"type\":\"MultiLine\"},{\"attributes\":{},\"id\":\"1956\",\"type\":\"ResetTool\"},{\"attributes\":{\"axis\":{\"id\":\"1678\"},\"ticker\":null},\"id\":\"1681\",\"type\":\"Grid\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1762\"},{\"id\":\"1763\"},{\"id\":\"1764\"},{\"id\":\"1765\"},{\"id\":\"1766\"},{\"id\":\"1767\"}]},\"id\":\"1769\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2028\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_color\":\"#F46D43\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1891\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1911\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1877\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1670\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1881\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1957\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1945\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1918\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2016\"},\"selection_policy\":{\"id\":\"2015\"}},\"id\":\"1700\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2030\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"formatter\":{\"id\":\"2064\"},\"ticker\":{\"id\":\"1911\"}},\"id\":\"1910\",\"type\":\"LinearAxis\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1952\"},{\"id\":\"1953\"},{\"id\":\"1954\"},{\"id\":\"1955\"},{\"id\":\"1956\"},{\"id\":\"1957\"}]},\"id\":\"1959\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1936\",\"type\":\"DataRange1d\"},{\"attributes\":{\"end_angle\":{\"units\":\"rad\",\"value\":4.1},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#8888ee\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#8888ee\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"start_angle\":{\"units\":\"rad\",\"value\":0.6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1702\",\"type\":\"AnnularWedge\"},{\"attributes\":{},\"id\":\"1691\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1919\",\"type\":\"HelpTool\"},{\"attributes\":{\"text\":\"multi_line\"},\"id\":\"1896\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1766\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2037\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2055\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1917\",\"type\":\"SaveTool\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2025\"},\"selection_policy\":{\"id\":\"2024\"}},\"id\":\"1738\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2016\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"1678\"}],\"center\":[{\"id\":\"1681\"},{\"id\":\"1685\"}],\"left\":[{\"id\":\"1682\"}],\"plot_height\":200,\"plot_width\":200,\"renderers\":[{\"id\":\"1703\"}],\"title\":{\"id\":\"1668\"},\"toolbar\":{\"id\":\"1693\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1670\"},\"x_scale\":{\"id\":\"1674\"},\"y_range\":{\"id\":\"1672\"},\"y_scale\":{\"id\":\"1676\"}},\"id\":\"1667\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAMAAAAAAAAD4vwAAAAAAAPC/AAAAAAAA4L8AAAAAAAAAAAAAAAAAAOA/AAAAAAAA8D8AAAAAAAD4PwAAAAAAAABA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]},\"y\":{\"__ndarray__\":\"AAAAAAAAEEAAAAAAAAACQAAAAAAAAPA/AAAAAAAA0D8AAAAAAAAAAAAAAAAAANA/AAAAAAAA8D8AAAAAAAACQAAAAAAAABBA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[9]}},\"selected\":{\"id\":\"2061\"},\"selection_policy\":{\"id\":\"2060\"}},\"id\":\"1890\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1860\",\"type\":\"DataRange1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1730\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2057\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text\":\"line\"},\"id\":\"1858\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1942\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"xs\":[{\"__ndarray__\":\"uB6F61G4AMD2KFyPwvUAwAAAAAAAAADAFK5H4XoU/r+PwvUoXI/+vw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"cT0K16Nw+b/sUbgehev5vwAAAAAAAPi/FK5H4XoU9r+PwvUoXI/2vw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"cT0K16Nw8b/sUbgehevxvwAAAAAAAPC/KVyPwvUo7L8fhetRuB7tvw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"4XoUrkfh4r/Xo3A9CtfjvwAAAAAAAOC/UrgehetR2L8+CtejcD3avw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"CtejcD0Kt7+4HoXrUbi+vwAAAAAAAAAAuB6F61G4vj8K16NwPQq3Pw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"PgrXo3A92j9SuB6F61HYPwAAAAAAAOA/16NwPQrX4z/hehSuR+HiPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"H4XrUbge7T8pXI/C9SjsPwAAAAAAAPA/7FG4HoXr8T9xPQrXo3DxPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"j8L1KFyP9j8UrkfhehT2PwAAAAAAAPg/7FG4HoXr+T9xPQrXo3D5Pw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"j8L1KFyP/j8UrkfhehT+PwAAAAAAAABA9ihcj8L1AEC4HoXrUbgAQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]}],\"ys\":[{\"__ndarray__\":\"MzMzMzMzD0AUrkfhehQQQGZmZmZmZhBAFK5H4XoUEEAzMzMzMzMPQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"MzMzMzMzAUApXI/C9SgCQM3MzMzMzAJAKVyPwvUoAkAzMzMzMzMBQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"zczMzMzM7D9SuB6F61HwP5qZmZmZmfE/UrgehetR8D/NzMzMzMzsPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"MzMzMzMzwz9I4XoUrkfRP2ZmZmZmZtY/SOF6FK5H0T8zMzMzMzPDPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"mpmZmZmZub97FK5H4XqUP5qZmZmZmbk/exSuR+F6lD+amZmZmZm5vw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"MzMzMzMzwz9I4XoUrkfRP2ZmZmZmZtY/SOF6FK5H0T8zMzMzMzPDPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"zczMzMzM7D9SuB6F61HwP5qZmZmZmfE/UrgehetR8D/NzMzMzMzsPw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"MzMzMzMzAUApXI/C9SgCQM3MzMzMzAJAKVyPwvUoAkAzMzMzMzMBQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]},{\"__ndarray__\":\"MzMzMzMzD0AUrkfhehQQQGZmZmZmZhBAFK5H4XoUEEAzMzMzMzMPQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[5]}]},\"selected\":{\"id\":\"2070\"},\"selection_policy\":{\"id\":\"2069\"}},\"id\":\"1928\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1915\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"#7FC97F\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_color\":{\"value\":\"#7FC97F\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1739\",\"type\":\"Annulus\"},{\"attributes\":{},\"id\":\"1866\",\"type\":\"LinearScale\"},{\"attributes\":{\"formatter\":{\"id\":\"2057\"},\"ticker\":{\"id\":\"1869\"}},\"id\":\"1868\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"1768\"}},\"id\":\"1764\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1904\",\"type\":\"LinearScale\"},{\"attributes\":{\"angle\":{\"units\":\"rad\",\"value\":-0.7},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1D91C0\"},\"height\":{\"units\":\"screen\",\"value\":25},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1D91C0\"},\"width\":{\"units\":\"screen\",\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1968\",\"type\":\"Oval\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1876\"},{\"id\":\"1877\"},{\"id\":\"1878\"},{\"id\":\"1879\"},{\"id\":\"1880\"},{\"id\":\"1881\"}]},\"id\":\"1883\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1767\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1876\",\"type\":\"PanTool\"},{\"attributes\":{\"end_angle\":{\"units\":\"rad\",\"value\":4.1},\"fill_color\":{\"value\":\"#8888ee\"},\"inner_radius\":{\"units\":\"screen\",\"value\":10},\"line_color\":{\"value\":\"#8888ee\"},\"outer_radius\":{\"units\":\"screen\",\"value\":20},\"start_angle\":{\"units\":\"rad\",\"value\":0.6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1701\",\"type\":\"AnnularWedge\"},{\"attributes\":{},\"id\":\"1869\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1907\",\"type\":\"BasicTicker\"},{\"attributes\":{\"formatter\":{\"id\":\"2010\"},\"ticker\":{\"id\":\"1683\"}},\"id\":\"1682\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1862\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1900\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1914\",\"type\":\"PanTool\"},{\"attributes\":{\"text\":\"annular_wedge\"},\"id\":\"1668\",\"type\":\"Title\"},{\"attributes\":{\"formatter\":{\"id\":\"2066\"},\"ticker\":{\"id\":\"1907\"}},\"id\":\"1906\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"1920\"}},\"id\":\"1916\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#F46D43\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1892\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2033\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"overlay\":{\"id\":\"1882\"}},\"id\":\"1878\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1955\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1958\"}},\"id\":\"1954\",\"type\":\"BoxZoomTool\"}],\"root_ids\":[\"2093\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"1fa5bad2-0260-4353-8034-7bcc6ea4539f\",\"root_ids\":[\"2093\"],\"roots\":{\"2093\":\"de90bc32-8e58-4561-a437-cafc8229513e\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "2093"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "from bokeh.layouts import gridplot\n",
    "#数据\n",
    "N=9\n",
    "x=np.linspace(-2, 2, N)\n",
    "y=x**2\n",
    "sizes = np.linspace(10, 20, N)\n",
    "xpts = np.array([-.09, -.12, .0, .12, .09])\n",
    "ypts = np.array([-.1, .02, .1, .02, -.1])\n",
    "#画布列表\n",
    "figures = []\n",
    "# 1. 环状楔\n",
    "p = figure(title=\"annular_wedge\")\n",
    "p.annular_wedge(x, y, 10, 20, 0.6, 4.1, color=\"#8888ee\",inner_radius_units=\"screen\", outer_radius_units=\"screen\")\n",
    "figures.append(p)\n",
    "# 2. 环状\n",
    "p = figure(title=\"annulus\")\n",
    "p.annulus(x, y, 10, 20,  color=\"#7FC97F\",inner_radius_units=\"screen\", outer_radius_units=\"screen\")\n",
    "figures.append(p)\n",
    "\n",
    "# 3.\n",
    "p = figure(title=\"arc\")\n",
    "p.arc(x, y,20, 0.6, 4.1,radius_units = \"screen\" , color=\"#BEAED4\",line_width=3)\n",
    "figures.append(p)\n",
    "\n",
    "\n",
    "# 4. bezier\n",
    "p = figure(title= \"bezier\")\n",
    "p.bezier(x, y, x+0.2, y, x+0.1, y+0.1,x-0.1, y-0.1,color=\"#8073AC\", line_width=2)\n",
    "figures.append(p)\n",
    "\n",
    "# 5.circle\n",
    "p = figure(title=\"circle\")\n",
    "p.circle(x, y, radius=0.1, color=\"#3288BD\")\n",
    "figures.append(p)\n",
    "\n",
    "# 6.line\n",
    "p = figure(title=\"line\")\n",
    "p.line(x, y, color= \"#F46D43\")\n",
    "figures.append(p)\n",
    "\n",
    "# 7.multi_line\n",
    "p = figure(title= \"multi_line\")\n",
    "p.multi_line([xpts+xx for xx in x],[ypts+yy for yy in y], color=\"#8073AC\",line_width=2)\n",
    "figures.append(p)\n",
    "\n",
    "# 8.oval\n",
    "p = figure(title=\"oval\")\n",
    "p.oval(x,y,15,25, angle=-0.7, color=\"#1D91C0\",width_units=\"screen\", height_units=\"screen\")\n",
    "figures.append(p)\n",
    "\n",
    "# 9. patch\n",
    "p = figure(title=\"patch\" )\n",
    "p.patch(x,y,color=\"#F46D43\")\n",
    "figures.append(p)\n",
    "\n",
    "# 网格展示\n",
    "show(gridplot(figures,ncols=4,plot_width=200,plot_height=200))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function figure in module bokeh.plotting.figure:\n",
      "\n",
      "figure(**kwargs)\n",
      "    Create a new Figure for plotting.\n",
      "    \n",
      "    A subclass of :class:`~bokeh.models.plots.Plot` that simplifies plot\n",
      "    creation with default axes, grids, tools, etc.\n",
      "    \n",
      "    Figure objects have many glyph methods that can be used to draw\n",
      "    vectorized graphical glyphs:\n",
      "    \n",
      "    .. hlist::\n",
      "        :columns: 3\n",
      "    \n",
      "        * :func:`~bokeh.plotting.figure.Figure.annular_wedge`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.annulus`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.arc`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.asterisk`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.bezier`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.circle`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.circle_cross`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.circle_dot`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.circle_x`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.circle_y`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.cross`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.dash`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.diamond`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.diamond_cross`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.diamond_dot`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.dot`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.ellipse`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.harea`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.hbar`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.hex`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.hex_tile`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.image`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.image_rgba`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.image_url`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.inverted_triangle`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.line`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.multi_line`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.multi_polygons`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.oval`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.patch`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.patches`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.plus`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.quad`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.quadratic`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.ray`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.rect`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.segment`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.square`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.square_cross`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.square_dot`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.square_pin`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.square_x`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.step`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.text`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.triangle`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.triangle_dot`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.triangle_pin`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.varea`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.vbar`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.wedge`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.x`\n",
      "        * :func:`~bokeh.plotting.figure.Figure.y`\n",
      "    \n",
      "    There is a scatter function that can be parameterized by marker type:\n",
      "    \n",
      "    * :func:`~bokeh.plotting.figure.Figure.scatter`\n",
      "    \n",
      "    There are also specialized methods for stacking bars:\n",
      "    \n",
      "    * bars: :func:`~bokeh.plotting.figure.Figure.hbar_stack`, :func:`~bokeh.plotting.figure.Figure.vbar_stack`\n",
      "    * lines: :func:`~bokeh.plotting.figure.Figure.hline_stack`, :func:`~bokeh.plotting.figure.Figure.vline_stack`\n",
      "    * areas: :func:`~bokeh.plotting.figure.Figure.harea_stack`, :func:`~bokeh.plotting.figure.Figure.varea_stack`\n",
      "    \n",
      "    As well as one specialized method for making simple hexbin plots:\n",
      "    \n",
      "    * :func:`~bokeh.plotting.figure.Figure.hexbin`\n",
      "    \n",
      "    In addition to all the ``Figure`` property attributes, the following\n",
      "    options are also accepted:\n",
      "    \n",
      "    .. bokeh-options:: FigureOptions\n",
      "        :module: bokeh.plotting.figure\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# 查看figure参数\n",
    "help(figure)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 案例三：散点图的绘制"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"20a5ea9f-246e-4f03-b224-a425a53f2058\" data-root-id=\"2761\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"f9b6da62-7e2a-4605-b219-c2b9b229ab95\":{\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"2770\"}],\"center\":[{\"id\":\"2773\"},{\"id\":\"2777\"}],\"left\":[{\"id\":\"2774\"}],\"plot_height\":400,\"plot_width\":400,\"renderers\":[{\"id\":\"2795\"}],\"title\":{\"id\":\"2914\"},\"toolbar\":{\"id\":\"2785\"},\"x_range\":{\"id\":\"2762\"},\"x_scale\":{\"id\":\"2766\"},\"y_range\":{\"id\":\"2764\"},\"y_scale\":{\"id\":\"2768\"}},\"id\":\"2761\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2782\",\"type\":\"ResetTool\"},{\"attributes\":{\"data_source\":{\"id\":\"2792\"},\"glyph\":{\"id\":\"2793\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"2794\"},\"selection_glyph\":null,\"view\":{\"id\":\"2796\"}},\"id\":\"2795\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2920\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2766\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2768\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2783\",\"type\":\"HelpTool\"},{\"attributes\":{\"formatter\":{\"id\":\"2915\"},\"ticker\":{\"id\":\"2775\"}},\"id\":\"2774\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,5,9,4]},\"selected\":{\"id\":\"2921\"},\"selection_policy\":{\"id\":\"2920\"}},\"id\":\"2792\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2764\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2771\",\"type\":\"BasicTicker\"},{\"attributes\":{\"source\":{\"id\":\"2792\"}},\"id\":\"2796\",\"type\":\"CDSView\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"2778\"},{\"id\":\"2779\"},{\"id\":\"2780\"},{\"id\":\"2781\"},{\"id\":\"2782\"},{\"id\":\"2783\"}]},\"id\":\"2785\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2775\",\"type\":\"BasicTicker\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"2784\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2779\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2915\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"2784\"}},\"id\":\"2780\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2793\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2781\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis\":{\"id\":\"2770\"},\"ticker\":null},\"id\":\"2773\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"2917\"},\"ticker\":{\"id\":\"2771\"}},\"id\":\"2770\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text\":\"\"},\"id\":\"2914\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2921\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2778\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"2774\"},\"dimension\":1,\"ticker\":null},\"id\":\"2777\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2917\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"navy\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"size\":{\"units\":\"screen\",\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2794\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2762\",\"type\":\"DataRange1d\"}],\"root_ids\":[\"2761\"]},\"title\":\"Bokeh Application\",\"version\":\"2.1.1\"}};\n",
       "  var render_items = [{\"docid\":\"f9b6da62-7e2a-4605-b219-c2b9b229ab95\",\"root_ids\":[\"2761\"],\"roots\":{\"2761\":\"20a5ea9f-246e-4f03-b224-a425a53f2058\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "2761"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#数据\n",
    "x = [1,2,3,4,5]\n",
    "y = [6,7,5,9,4]\n",
    "\n",
    "#画布：尺寸\n",
    "p.scatter(x,y,size=20,marker=\"circle\",color=\"navy\",alpha=0.5)\n",
    "p = figure(plot_width=400,plot_height = 400)\n",
    "    p.circle(x,y,size=20,color=\"navy\",alpha=0.5)\n",
    "\n",
    "#显示\n",
    "show(p)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "165px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
